//
//  StepTableViewCell.m
//  Menu
//
//  Created by YouLu on 15/7/4.
//  Copyright (c) 2015年 lijiangang. All rights reserved.
//

#import "StepTableViewCell.h"

@implementation StepTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews
{
    self.stepImageView = [[UIImageView alloc] initWithFrame:CGRectMake(40*WIDTH, 10*HEIGHT, 295*WIDTH, 190*HEIGHT)];
    [self.contentView addSubview:self.stepImageView];
    [_stepImageView release];
    
    self.stepLabel = [[UILabel alloc] initWithFrame:CGRectMake(40*WIDTH, 200*HEIGHT, 295*WIDTH, 50*HEIGHT)];
    self.stepLabel.font = [UIFont systemFontOfSize:13];
    self.stepLabel.numberOfLines = 0;
    [self.contentView addSubview:self.stepLabel];
    [_stepLabel release];
    
}

-(void)setModel:(StepModel *)model{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    
    NSString *str = [NSString stringWithFormat:@"%@%@",model.order_id,model.describe];
    self.stepLabel.text = str;
    [self.stepImageView sd_setImageWithURL:[NSURL URLWithString:model.imagePath]];
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
